package com.ruoyi.returnMaterials.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.returnMaterials.mapper.ErpProductionReturnMaterialMapper;
import com.ruoyi.returnMaterials.domain.ErpProductionReturnMaterial;
import com.ruoyi.returnMaterials.service.IErpProductionReturnMaterialService;

/**
 * 生产退料Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-30
 */
@Service
public class ErpProductionReturnMaterialServiceImpl implements IErpProductionReturnMaterialService 
{
    @Autowired
    private ErpProductionReturnMaterialMapper erpProductionReturnMaterialMapper;

    /**
     * 查询生产退料
     * 
     * @param id 生产退料主键
     * @return 生产退料
     */
    @Override
    public ErpProductionReturnMaterial selectErpProductionReturnMaterialById(Long id)
    {
        return erpProductionReturnMaterialMapper.selectErpProductionReturnMaterialById(id);
    }

    /**
     * 查询生产退料列表
     * 
     * @param erpProductionReturnMaterial 生产退料
     * @return 生产退料
     */
    @Override
    public List<ErpProductionReturnMaterial> selectErpProductionReturnMaterialList(ErpProductionReturnMaterial erpProductionReturnMaterial)
    {
        return erpProductionReturnMaterialMapper.selectErpProductionReturnMaterialList(erpProductionReturnMaterial);
    }

    /**
     * 新增生产退料
     * 
     * @param erpProductionReturnMaterial 生产退料
     * @return 结果
     */
    @Override
    public int insertErpProductionReturnMaterial(ErpProductionReturnMaterial erpProductionReturnMaterial)
    {
        return erpProductionReturnMaterialMapper.insertErpProductionReturnMaterial(erpProductionReturnMaterial);
    }

    /**
     * 修改生产退料
     * 
     * @param erpProductionReturnMaterial 生产退料
     * @return 结果
     */
    @Override
    public int updateErpProductionReturnMaterial(ErpProductionReturnMaterial erpProductionReturnMaterial)
    {
        return erpProductionReturnMaterialMapper.updateErpProductionReturnMaterial(erpProductionReturnMaterial);
    }

    /**
     * 批量删除生产退料
     * 
     * @param ids 需要删除的生产退料主键
     * @return 结果
     */
    @Override
    public int deleteErpProductionReturnMaterialByIds(Long[] ids)
    {
        return erpProductionReturnMaterialMapper.deleteErpProductionReturnMaterialByIds(ids);
    }

    /**
     * 删除生产退料信息
     * 
     * @param id 生产退料主键
     * @return 结果
     */
    @Override
    public int deleteErpProductionReturnMaterialById(Long id)
    {
        return erpProductionReturnMaterialMapper.deleteErpProductionReturnMaterialById(id);
    }
}
